Welcome![Sign In][Sign Up]
Location:
Search - High-precision timer

Search list

[WEB CodeCPU 测速(MHz)和高精度延时(微秒级)

Description: 一.高精度延时, 是 CPU 测速的基础 Windows 内部有一个精度非常高的定时器, 精度在微秒级, 但不同的系统这个定时器的频率不同, 这个频率与硬件和操作系统都可能有关。 利用 API 函数 QueryPerformanceFrequency 可以得到这个定时器的频率。 利用 API 函数 QueryPerformanceCounter 可以得到定时器的当前值。 根据要延时的时间和定时器的频率, 可以算出要延时的时间定时器经过的周期数。 在循环里用 QueryPerformanceCounter 不停的读出定时器值, 一直到经过了指定周期数再结束循环, 就达到了高精度延时的目的。 高精度延时的程序, 参数: 微秒 二.测速程序 利用 rdtsc 汇编指令可以得到 CPU 内部定时器的值, 每经过一个 CPU 周期, 这个定时器就加一。 如果在一段时间内数得 CPU 的周期数, CPU工作频率 = 周期数 / 时间 为了不让其他进程和线程打扰, 必需要设置最高的优先级 以下函数设置当前进程和线程到最高的优先级。 SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS) SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL) CPU 测速程序的源代码, 这个程序通过 CPU 在 1/16 秒的时间内经过的周期数计算出工作频率, 单位 MHz: -one. High-precision delay, the CPU speed is the basis of Windows within a very high accuracy of the timer, the microsecond precision, but in the system timer different frequencies, the frequency and hardware and the operating system are likely. Using API function can be QueryPerformanceFrequency the timing The frequency. Use QueryPerformanceCounter API function can be the current timer value. According to the delay time and the frequency of the timer, you could calculate the time to delay timer after a few cycles. The circle with QueryPerformanceCounter repeatedly read out the timer value, until after a specified number of cycles end the cycle again, it reached a high precision delay purposes. High-precision delay the procedure parameters : 2 microsecond. Gun utilize RDTSC instruction can
Platform: | Size: 1213 | Author: 马俊 | Hits:

[CommunicationCBuilderGetTime

Description: 虽然Windows下可视化开发工具如VC、Delphi、C++ Builder等都有专用的定时器控件Timer,而且使用很方便,可以实现一定的定时功能,但最小计时精度仅为55ms,且定时器消息在多任务操作系统中的优先级很低,不能得到及时响应,往往不能满足实时控制环境下的应用。不过Microsoft公司在Win32 API函数库中已经为用户提供了一组用于高精度计时的底层函数,如果用户使用得当,计时精度可到1ms。这个计时精度、对于一般的实时系统控制完全可以满足要求。现将由C++ Builder 4.0提供的重新封装后的一组与时间相关的主要接口函数(函数名、参数、功能与Win32 API基本相同)说明如下: -visual development tools such as Visual C + +, Delphi, C + + Builder and others all have dedicated Timer timer control, but it is convenient. can achieve a timing function, but only the minimum time of 55 ms accuracy. Timer news and multi-task operating system in the low priority that is not to respond in a timely manner, often fail to meet the real-time control environment applications. However, Microsoft Corporation in the Win32 API function has been to provide the user with a group for high-precision the bottom was a time function, if the user is properly utilized, time accuracy can be a ms. Accuracy this time, and for most of the real-time control system can meet the requirements. Now by C + + Builder 4.0 for the re-packaging of a group associated with the time the main interface funct
Platform: | Size: 1796 | Author: wangjing | Hits:

[OS programHighSpeedTimer

Description: 高精度秒表:利用Delphi自带的Timer控件你能够进行精确计时吗?超过1秒时可以,但是能够在1秒内计时吗?精度 高吗?该程序演示了利用timer控件和两种高精度计时方法进行比较,看看1分钟内的精度差别多大?程序虽然简单,在对硬件控制中很有用。-precision stopwatch : Delphi, bringing their use of Timer control you can accurately time? More than one seconds, but, in a seconds time? High accuracy? The procedure demonstrated a timer control and the use of two methods for high-precision timing, see a minute of accuracy how much difference? Although a simple procedure, in the control of the hardware useful.
Platform: | Size: 168925 | Author: 谭俊哲 | Hits:

[Other resourcebyvhdstopwatchl

Description: 1.高精度数字秒表(0.01秒的vhdl语言实现) 2.具有定时,暂停,按键随机存储,翻页回放功能; 3.对30M时钟分频产生显示扫描时钟 4.精度高达0.01s,并且可以通过改变主频来更改分频比和记数间隔,可控性高。 5.模块化设计,其中的许多函数可以成为vhdl语言的通用经典例子(包含分频电路设计,动态扫描时钟设计,译码电路设计,存储器设计,存储回放显示设计)-1. High-precision digital stopwatch (0.01 seconds vhdl language) 2. With a timer, suspended Random memory keys, flip playback function; 3. right 30M clock frequency scan have revealed four clock. Precision high 0.01s and and can be changed to alter the frequency than the frequency interval and Hutchison, controlled high. 5. Modular design, Many of these functions can become the common language vhdl classic examples (including sub-frequency circuit design, Dynamic scanning clock design, decoding circuit design, memory design, storage intervals showed Design)
Platform: | Size: 1995 | Author: 方周 | Hits:

[Software Engineeringjyshzipljdshjyfx

Description: 本设计以AT89C52为核心,充分利用AT89C52的三个定时/计时器,采用测量N个周期信号波形的算法.实现了频率,周期高精度的测量.-AT89C52 to the design at the core, and make full use of the three regular AT89C52 / timer, Measure N cycle signal waveform algorithms. achieve a frequency, high-precision measurement cycle.
Platform: | Size: 131590 | Author: 307xzj | Hits:

[OtherSetWaitableTimer

Description: 高精度定时器SetWaitableTimer的使用例程,精度可达到100ns,最短定时周期1ms。-The use of high-precision timer SetWaitableTimer routines, precision can reach 100ns, the minimum timing cycle, 1ms.
Platform: | Size: 12288 | Author: yangfeng | Hits:

[OtherHighAccuracyTimer

Description: 这是前一遍文章《真正的精确到毫秒级的动态秒表》的改进,改进了前一遍文章只能在VB开发环境中运行,而编译成EXE文件不能运行的错误(一开始计时就崩溃)。同时,增加了高精度计时器的演示。-This is again before the article, " The real dynamic is accurate to the millisecond stopwatch" improvements, improved over the previous articles can only be run in the VB development environment, and compiled into EXE files do not run (the start time to crash) . At the same time, an increase of high-precision timer demo.
Platform: | Size: 16384 | Author: shenhaiyu | Hits:

[Com Portrs485

Description: 操作串口直接进行RS485多机通信的类。单片机下485多机通信很容易,用UART的Bit9即可,Windows下就麻烦得多,Windows下串口Bit9用作奇偶校验,要切换Bit9就要动态改通信格式,而且切换时间要跟得上单片机的us级时间。这个自己写的Class用独立线程、Windows高精度定时器机制,高速切换Bit9,示波器测量,时间在10us左右,已用于门禁系统多年,长时间运行可靠! -Direct RS485 serial port operation multi-machine communication class. Under the more than 485 single chip computer communication is easy, you can use the UART of Bit9, Windows is much lower in trouble, Windows for the next serial Bit9 Parity, Bit9 will dynamically change to switch the communication format, and the switching time to keep up with SCM us-class time. Class of this with their own separate thread to write, Windows high precision timer mechanism, high-speed switching Bit9, oscilloscope measurements, the time is about 10us, access control systems have been used for many years, long-running and reliable!
Platform: | Size: 10240 | Author: | Hits:

[MiddleWarevs2008Pmatlab

Description: 用Vs2008实现在 matlab环境下的2ms的高精度定时器,非常好用-Achieved with Vs2008 2ms in matlab environment of high-precision timer, very easy to use
Platform: | Size: 14987264 | Author: 胡均松 | Hits:

[VC/MFCvc_timeSetEvent

Description: vc高精度定时器timeSetEvent使用例程-routine use of high-precision timer timeSetEvent
Platform: | Size: 12288 | Author: GYT | Hits:

[e-language45

Description: 易语言高精度计时器源码,很不错的易语言源码,适合易语言爱好者学习。-Easy language to high-precision timer source, very good and easy language source code for easy language enthusiasts to learn.
Platform: | Size: 3072 | Author: fly5 | Hits:

[SCMtimer

Description: 51单片机实现高精度定时,程序精简实用,请下载。-51 single-chip high-precision timing, streamline procedures and practical, please download.
Platform: | Size: 1024 | Author: 11223 | Hits:

[CSharpJoyStick

Description: .net 下的游戏杆开发类(包含自己开发的高精度定时器类)及WPF测试界面。注意:1、app.config中startup标签添加的一个属性;2、菜单-调试-异常-loaderlock取消选中,否则会报运行时错误。-Joystick development under .net class (including own developed high-precision timer class) and WPF test interface. Note: 1, an attribute added to the app.config startup label 2, Menu- Commissioning- exception-loaderlock unchecked, otherwise a runtime error will be reported.
Platform: | Size: 401408 | Author: lxj | Hits:

[ADO-ODBCSelect-timer-for-delphi

Description: 高精度时间同步方法(delphi源码编程)- high-precision time synchronization method (delphi source programming)
Platform: | Size: 173056 | Author: zhengyiho | Hits:

[Windows Developvb-timer(API)

Description: vb高精度计时,采用QueryPerformanceFrequency、QueryPerformanceCounter API函数读取系统频率和计数,计算出时间,精度很高。- VB high-precision timing, using QueryPerformanceFrequency, QueryPerformanceCounter API function to read the system frequency and count, calculate the time, high accuracy.
Platform: | Size: 2048 | Author: 李新武 | Hits:

[File OperateAPI

Description: Celapsed就是用Windows API编写的2个高精度计时器-Celapsed is to use the Windows API to write two high precision timer
Platform: | Size: 27648 | Author: Mavis | Hits:

[source in ebookprecioiontimer

Description: 利用它们就可以编写自己的高精度计时器了,就是用编写的高精度计时器-Take advantage of them you can write your own high precision timer, is to use written in high precision timer
Platform: | Size: 16384 | Author: whxtha | Hits:

[Process-Threadiigh__precision__Celapsed

Description: Celapsed is to use the Windows API to write two high precision timer
Platform: | Size: 27648 | Author: srstd$670495 | Hits:

[GUI Develop0560423

Description: 利用它们就可以编写自己的高精度计时器了,就是用编写的高精度计时器(Take advantage of them you can write your own high precision timer, is to use written in high precision timer)
Platform: | Size: 21504 | Author: eccelyh | Hits:

[OtherccrpTmr6

Description: ccrptmr6是一款VB高精度定时器,可用于高精度定时操作(Ccrptmr6 is a VB high precision timer)
Platform: | Size: 190464 | Author: bestton | Hits:
« 1 2 34 5 »

CodeBus www.codebus.net